Optimal. Leaf size=115 \[ \frac{(B (n+3)+i A (3-n)) (c-i c \tan (e+f x))^n \text{Hypergeometric2F1}\left (3,n,n+1,\frac{1}{2} (1-i \tan (e+f x))\right )}{48 a^3 f n}+\frac{(-B+i A) (c-i c \tan (e+f x))^n}{6 a^3 f (1+i \tan (e+f x))^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.170665, antiderivative size = 115, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.073, Rules used = {3588, 78, 68} \[ \frac{(B (n+3)+i A (3-n)) (c-i c \tan (e+f x))^n \, _2F_1\left (3,n;n+1;\frac{1}{2} (1-i \tan (e+f x))\right )}{48 a^3 f n}+\frac{(-B+i A) (c-i c \tan (e+f x))^n}{6 a^3 f (1+i \tan (e+f x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3588
Rule 78
Rule 68
Rubi steps
\begin{align*} \int \frac{(A+B \tan (e+f x)) (c-i c \tan (e+f x))^n}{(a+i a \tan (e+f x))^3} \, dx &=\frac{(a c) \operatorname{Subst}\left (\int \frac{(A+B x) (c-i c x)^{-1+n}}{(a+i a x)^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(i A-B) (c-i c \tan (e+f x))^n}{6 a^3 f (1+i \tan (e+f x))^3}+\frac{(c (A (3-n)-i B (3+n))) \operatorname{Subst}\left (\int \frac{(c-i c x)^{-1+n}}{(a+i a x)^3} \, dx,x,\tan (e+f x)\right )}{6 f}\\ &=\frac{(i A (3-n)+B (3+n)) \, _2F_1\left (3,n;1+n;\frac{1}{2} (1-i \tan (e+f x))\right ) (c-i c \tan (e+f x))^n}{48 a^3 f n}+\frac{(i A-B) (c-i c \tan (e+f x))^n}{6 a^3 f (1+i \tan (e+f x))^3}\\ \end{align*}
Mathematica [F] time = 180.005, size = 0, normalized size = 0. \[ \text{\$Aborted} \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 2.055, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( A+B\tan \left ( fx+e \right ) \right ) \left ( c-ic\tan \left ( fx+e \right ) \right ) ^{n}}{ \left ( a+ia\tan \left ( fx+e \right ) \right ) ^{3}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left ({\left (A - i \, B\right )} e^{\left (6 i \, f x + 6 i \, e\right )} +{\left (3 \, A - i \, B\right )} e^{\left (4 i \, f x + 4 i \, e\right )} +{\left (3 \, A + i \, B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + A + i \, B\right )} \left (\frac{2 \, c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{n} e^{\left (-6 i \, f x - 6 i \, e\right )}}{8 \, a^{3}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (f x + e\right ) + A\right )}{\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{n}}{{\left (i \, a \tan \left (f x + e\right ) + a\right )}^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]